<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let requestID = window.requestAnimationFrame(() => {
        console.log('Repaint!');
    })
    window.cancelAnimationFrame(requestID);
</script>
</body>
</html>